package com.huawei.appmarket.service.alarm.control;

import android.app.IntentService;
import android.content.Intent;
import androidx.annotation.Nullable;
import com.huawei.secure.android.common.intent.SafeIntent;
import o.Logger;

public class BasePowerConnectChangeService extends IntentService {
    public static final String INTENT_TYPE_KEY = "intent_power_change_type_key";
    public static final int START_TYPE_POWER_CONNECTED = 1;
    public static final int START_TYPE_POWER_DEFAULT = 0;
    public static final int START_TYPE_POWER_DISCONNECTED = 2;

    public BasePowerConnectChangeService(String str) {
        super(str);
    }

    public BasePowerConnectChangeService() {
        super("BasePowerConnectChangeService");
    }

    protected void onHandleIntent(@Nullable Intent intent) {
        if (intent == null) {
            Logger.ˎ("BasePowerConnectChangeService", "intent == null");
            return;
        }
        switch (new SafeIntent(intent).getIntExtra(INTENT_TYPE_KEY, 0)) {
            case 1:
                executePowerConnectTask();
                return;
            case 2:
                executePowerDisconnectTask();
                return;
            default:
                return;
        }
    }

    public void executePowerConnectTask() {
    }

    public void executePowerDisconnectTask() {
    }
}
